This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
We are trying to take in french characters into an agent that's receiving content from an HTTP POST. When we get the documentContext and grab the contents of the CGI REQUEST_CONTENT variable, the french characters are all messed up. The calling system has set the output stream to UTF-8, and when I rewrite the agent as a servlet and set the InputStreamReader to UTF-8, it works like a charm. However, we can't get the agent to receive the posted french data correctly.
We have tried the following:
Document xmlDoc = agentContext.getDocumentContext();
InputStream is = new ByteArrayInputStream(xmlDoc.getItemValueString("REQUEST_CONTENT").getBytes("UTF-8"));
BufferedReader in = new BufferedReader(new InputStreamReader(is));
and
Document xmlDoc = agentContext.getDocumentContext();
byte[] bytes = xmlDoc.getItemValueString("REQUEST_CONTENT").getBytes("UTF-8");
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
BufferedReader in = new BufferedReader(new InputStreamReader(bais));
Neither of these approaches have worked.
Is there a way to tell the session or agentContext to expect UTF-8?
Thanks,
Scott.
Feedback number WEBB9EJRE2 created by ~George Zekluvitchikle on 12/19/2013
Status: Open
Comments: